<!--首页展示医院的卡片组件-->
<template>
  <el-card class="box-card" shadow="hover" v-on:click="goDetail" >
    <div class="content">
      <div class="left">
        <div class="hospital_name">
          {{props.hospitalInfo.hosname}}
        </div>
        <div class="tip">
          <div class="level">
            <svg t="1693149936525" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4211" width="16" height="16">
              <path d="M180.2 363.5h133.1c15.6 0 30.8-4.9 43.5-14l29.1-20.9c66.1-47.5 106.9-122.5 110.9-203.8C497.9 102 516.7 84 539.6 84h4.8c20.7 0 35.2 7 51 28.1 48.4 60.4 50.3 140.4 35.9 214.4l-2.3 12c-4.9 11.9 3.9 24.9 16.7 24.9H828c45.1 0 78.4 8.1 67.2 86.2C873.5 639 818.3 815.7 797 857.4c-12.8 23.7-31.6 39.3-56.6 39.3H209.7c-28.1 0-51.3-21.7-53.3-49.7L127 420.4c-2.2-30.7 22.2-56.9 53.2-56.9z" fill="#FFA820" p-id="4212"></path>
              <path d="M630.8 896.9h109.5c25 0 43.8-15.7 56.6-39.3 21.2-41.8 76.5-218.5 98.2-407.8 10.3-71.3-16.6-84.2-55.7-85.9 21.5 49.5 33.4 104.1 33.4 161.6-0.1 165.7-99.5 308.3-242 371.4zM151.8 781.8l4.5 65.4c1.9 28 25.2 49.7 53.3 49.7h93c-59-26.1-110.6-65.8-150.8-115.1zM497.2 120.4c42.4 3.2 83 12.8 120.7 28-6-12.6-13.5-24.8-22.7-36.2-7.8-10.4-15.3-17.4-23.4-21.8-12.8-2.5-25.9-4.4-39-5.8-18.2 2.9-32.8 17.3-35.6 35.8z" fill="#FEB133" p-id="4213"></path>
              <path d="M449.1 856.1c-130.5 0-244.2-71.4-304.4-177.3l7.1 103c40.2 49.3 91.8 89 150.7 115.1h328.3c142.5-63 242-205.7 242-371.5 0-57.4-11.9-112-33.4-161.6-3.7-0.2-7.6-0.2-11.5-0.2h-59.2c19.5 43.6 30.3 91.9 30.3 142.7-0.1 193.1-156.7 349.8-349.9 349.8zM496.7 124.8c-0.6 11.6-1.9 23-3.9 34.2 52.3 6.5 101 24.6 143.4 51.5-3.1-21.6-8.9-42.6-18.3-62.3-37.8-15.2-78.3-24.8-120.7-28-0.2 1.6-0.4 3.1-0.5 4.6z" fill="#FEB533" p-id="4214"></path>
              <path d="M482.8 198.1c60 10.6 113.6 39.4 155.1 80.4 1.8-22.8 1.6-45.7-1.6-67.9-42.5-27-91.2-45-143.4-51.5-2.5 13.3-5.8 26.3-10.1 39zM431.4 780.6c-162.1 0-293.5-131.4-293.5-293.5 0-43.2 9.3-84.2 26.1-121.1-22.8 7.2-38.8 29.3-37.1 54.5l17.8 258.2C204.8 784.6 318.6 856 449.1 856c193.2 0 349.8-156.6 349.8-349.8 0-50.8-10.8-99.1-30.3-142.7h-70.9c17.5 37.6 27.2 79.4 27.2 123.6 0 162.1-131.4 293.5-293.5 293.5z" fill="#FEBA33" p-id="4215"></path>
              <path d="M466.1 236.6C572 260.5 651 355 651 468.1c0 131-106.2 237.3-237.3 237.3S176.5 599.1 176.5 468.1c0-37.5 8.7-73 24.2-104.5h-20.6c-5.6 0-11.1 0.9-16.2 2.5-16.8 36.9-26.1 77.9-26.1 121.1 0 162.1 131.4 293.5 293.5 293.5s293.5-131.4 293.5-293.5c0-44.2-9.8-86-27.2-123.6h-52.1c-12.9 0-21.6-13-16.7-24.9l2.3-12c3.1-15.8 5.4-31.9 6.7-48.1-41.5-41.1-95.2-69.8-155.1-80.4-4.5 13.2-10 26-16.6 38.4z" fill="#FFBE34" p-id="4216"></path>
              <path d="M413.7 705.3c131 0 237.3-106.2 237.3-237.3 0-113-79.1-207.6-184.9-231.4-6.9 13.1-14.9 25.6-23.9 37.4 77.6 20.4 134.9 91 134.9 175 0 99.9-81 180.9-180.9 180.9s-180.9-81-180.9-180.9c0-30.9 7.8-60 21.4-85.4h-36c-15.5 31.5-24.2 67-24.2 104.5 0 131 106.2 237.2 237.2 237.2z" fill="#FFC234" p-id="4217"></path>
              <path d="M396.2 629.9c99.9 0 180.9-81 180.9-180.9 0-84-57.3-154.6-134.9-175-9.6 12.6-20.4 24.4-32.3 35.2 53.7 13.9 93.3 62.7 93.3 120.7 0 68.9-55.8 124.7-124.7 124.7s-124.7-55.8-124.7-124.7c0-24.4 7-47.1 19.1-66.4h-36.3C223 389 215.3 418.1 215.3 449c0 99.9 81 180.9 180.9 180.9z" fill="#FFC734" p-id="4218"></path>
              <path d="M378.5 554.5c68.9 0 124.7-55.8 124.7-124.7 0-58-39.6-106.8-93.3-120.7-7.6 6.9-15.6 13.4-24 19.5l-29.1 20.9c-12.7 9.1-27.9 14-43.5 14H273c-12.1 19.2-19.1 42-19.1 66.4-0.1 68.8 55.8 124.6 124.6 124.6z" fill="#FFCB34" p-id="4219"></path>
              <path d="M740.3 905.9H209.6c-32.7 0-60-25.5-62.2-58.1L118 421.2c-1.2-17.2 4.9-34.3 16.6-46.8 11.8-12.6 28.4-19.8 45.6-19.8h133.1c13.8 0 27.1-4.3 38.3-12.3l29.1-20.9c31.3-22.5 57.7-52.3 76.1-86.2 18.4-33.9 29.2-72.2 31-110.7 1.3-27.7 24.1-49.4 51.8-49.4h4.8c24.4 0 41.3 9.2 58.1 31.6 43.1 53.9 55.8 128.5 37.6 221.7l-2.5 12.8-0.3 0.8c-1.2 2.8-0.9 5.9 0.9 8.5 1.7 2.6 4.5 4 7.5 4H828c22.8 0 48.5 1.5 64.2 19.7 13.4 15.5 17.2 39.8 11.9 76.6-12.1 105.5-33.6 199.8-49.5 260.4-19.8 75.4-39.2 129.9-49.6 150.4l-0.1 0.2c-15.7 28.8-38 44.1-64.6 44.1zM180.2 372.5c-12.4 0-24 5-32.4 14.1s-12.7 20.9-11.8 33.3l29.4 426.6c1.6 23.2 21 41.3 44.3 41.3h530.7c19.9 0 36.2-11.6 48.6-34.5 10-19.7 28.8-72.7 48.2-146.7 15.8-60 37.1-153.5 49-258v-0.3c4.5-30.9 1.9-51.3-7.7-62.4-9.7-11.2-27.2-13.5-50.6-13.5H645.5c-9 0-17.4-4.5-22.5-12-4.9-7.2-5.9-16.3-2.9-24.4l2.2-11.2c17.1-87.9 5.6-157.5-34.1-207.1l-0.2-0.2C574.5 99.4 563 93 544.2 93h-4.8c-18.1 0-32.9 14.2-33.8 32.2-2 41.2-13.5 82.2-33.2 118.5-19.7 36.3-47.9 68.2-81.4 92.2l-29 20.9c-14.3 10.3-31.2 15.7-48.8 15.7h-133z" fill="#FFA820" p-id="4220"></path>
              <path d="M536.9 198.5c-9.7-2.4-19.4 3.5-21.8 13.2-15.5 63-62.2 107.6-62.8 108.1-7.2 6.8-7.6 18.2-0.8 25.4 3.5 3.8 8.3 5.7 13.1 5.7 4.4 0 8.8-1.6 12.3-4.9 2.2-2.1 55-52.1 73.1-125.8 2.5-9.6-3.4-19.3-13.1-21.7zM411.9 354.5l-9.5 6.8c-8.1 5.8-9.9 17.1-4.1 25.1 3.2 4.5 8.1 7 13.2 7.4 4.1 0.3 8.3-0.8 11.9-3.4l9.5-6.8c8.1-5.8 9.9-17.1 4.1-25.1-5.8-8-17-9.8-25.1-4z" fill="#FFFFFF" p-id="4221"></path><path d="M222 426.3h78.3c13.4 0 24.3 10.9 24.3 24.3v359.6c0 13.4-10.9 24.3-24.3 24.3h-54.5c-12.8 0-23.4-9.9-24.2-22.7l-23.8-359.6c-0.9-14 10.2-25.9 24.2-25.9z" fill="#FFE3B4" p-id="4222"></path>
            </svg>
            <span>{{props.hospitalInfo.param.hostypeString}}</span>
          </div>
          <div class="time">
            <svg t="1693150119390" class="icon" viewBox="0 0 1026 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5458" width="16" height="16">
              <path d="M194.873469 894.432653c-5.746939 0-12.016327-2.089796-16.718367-6.791837-9.404082-9.404082-9.404082-24.032653 0-33.436734L266.44898 765.910204c9.404082-9.404082 24.032653-9.404082 33.436734 0 9.404082 9.404082 9.404082 24.032653 0 33.436735l-88.293877 88.293877c-4.702041 4.179592-10.44898 6.791837-16.718368 6.791837zM833.828571 894.432653c-5.746939 0-12.016327-2.089796-16.718367-6.791837L728.816327 799.346939c-9.404082-9.404082-9.404082-24.032653 0-33.436735s24.032653-9.404082 33.436734 0l88.293878 88.293878c9.404082 9.404082 9.404082 24.032653 0 33.436734-4.179592 4.179592-10.44898 6.791837-16.718368 6.791837z" fill="#AF8015" p-id="5459"></path>
              <path d="M514.612245 894.432653c-46.497959 0-91.428571-8.881633-133.746939-27.167347-40.75102-17.240816-77.322449-41.795918-109.191837-73.665306s-55.902041-67.918367-73.142857-108.669388c-17.763265-42.318367-27.167347-87.24898-27.167347-133.746939S180.767347 460.277551 198.530612 417.959184c17.240816-40.75102 41.795918-77.322449 73.665306-109.191837s67.918367-55.902041 108.669388-73.665306c42.318367-17.763265 87.24898-27.167347 133.746939-27.167347s91.428571 8.881633 133.746939 27.167347c40.75102 17.240816 77.322449 41.795918 109.191836 73.665306s55.902041 68.440816 73.142858 109.191837c17.763265 42.318367 27.167347 87.24898 27.167346 133.746938s-8.881633 91.428571-27.167346 133.746939c-17.240816 40.75102-41.795918 77.322449-73.665307 109.191837s-67.918367 55.379592-109.191836 72.620408c-42.318367 18.285714-86.726531 27.167347-133.22449 27.167347z" fill="#F2CB51" p-id="5460"></path>
              <path d="M514.612245 833.828571c-38.138776 0-75.232653-7.314286-109.714286-21.942857-33.436735-14.106122-63.738776-34.481633-89.861224-60.604081s-46.497959-55.902041-60.604082-89.861225c-14.628571-35.004082-21.942857-71.57551-21.942857-109.714286 0-38.138776 7.314286-75.232653 21.942857-109.714285 14.106122-33.436735 34.481633-63.738776 60.604082-89.861225S370.938776 305.632653 404.897959 291.526531c35.004082-14.628571 71.57551-21.942857 109.714286-21.942858 38.138776 0 75.232653 7.314286 109.714286 21.942858 33.436735 14.106122 63.738776 34.481633 89.861224 60.604081s46.497959 55.902041 60.604082 89.861225c14.628571 35.004082 21.942857 71.57551 21.942857 109.714285 0 38.138776-7.314286 75.232653-21.942857 109.714286-14.106122 33.436735-34.481633 63.738776-60.604082 89.861225s-55.902041 46.497959-89.861224 60.604081c-34.481633 14.106122-71.57551 21.942857-109.714286 21.942857z" fill="#FFF4D7" p-id="5461"></path>
              <path d="M857.861224 353.697959c-6.269388 0-12.016327-2.612245-16.718367-6.791837l-146.808163-146.808163c-9.404082-9.404082-9.404082-24.032653 0-33.436735 49.632653-49.632653 130.089796-49.632653 179.722449 0s49.632653 130.089796 0 179.722449c-4.179592 4.702041-9.926531 7.314286-16.195919 7.314286zM171.363265 353.697959c-6.269388 0-12.016327-2.612245-16.718367-6.791837-49.632653-49.632653-49.632653-130.089796 0-179.722449s130.089796-49.632653 179.722449 0c9.404082 9.404082 9.404082 24.032653 0 33.436735l-146.285714 146.285714c-4.702041 4.179592-10.44898 6.791837-16.718368 6.791837z" fill="#E5404F" p-id="5462"></path>
              <path d="M517.22449 574.693878H344.816327c-13.061224 0-23.510204-10.44898-23.510205-23.510205s10.44898-23.510204 23.510205-23.510204h172.408163c13.061224 0 23.510204 10.44898 23.510204 23.510204s-10.971429 23.510204-23.510204 23.510205z" fill="#AA1D32" p-id="5463"></path>
              <path d="M517.22449 574.693878c-13.061224 0-23.510204-10.44898-23.510204-23.510205V330.187755c0-13.061224 10.44898-23.510204 23.510204-23.510204s23.510204 10.44898 23.510204 23.510204v220.995918c0 13.061224-10.971429 23.510204-23.510204 23.510205z" fill="#E5404F" p-id="5464"></path>
            </svg>
            <span>每天{{props.hospitalInfo.bookingRule?.releaseTime}}放号</span>
          </div>
        </div>
      </div>
      <div class="right">
        <img :src="`data:image/jpeg;base64,${hospitalInfo.logoData}`" alt="">
      </div>
    </div>
  </el-card>
</template>

<script setup lang="ts">
import {useRouter} from "vue-router";
//接收父组件传过来的已有的医院数据
const props = defineProps(["hospitalInfo",])
let $router = useRouter();
//点击医院卡片跳转到医院详情页面
const goDetail = ()=>{
  $router.push({path:"/hospital/register",query:{hoscode:props.hospitalInfo.hoscode}});
}

</script>

<style scoped lang="scss">
.box-card {
  cursor: pointer;
}
.content {
  display: flex;
  justify-content: space-between;
  .right {
    img{
      width: 50px;
      height: 50px;
    }
  }
  .left {
    width: 60%;
    .tip {
      color: #7f7f7f;
      display: flex;
      justify-content: space-between;
      margin-top: 20px;
      .level {
        display: flex;
        align-items: center;
        span{
          margin-left: 5px;
        }
      }
      .time {
        display: flex;
        align-items: center;
        span{
          margin-left: 5px;
        }
      }
    }
  }
}
</style>
